package cn.mrlong.tools.bean

open class Record : Comparable<Record> {
    var id: Int? = -1
    var title: String? = null
    var showOrder: Int? = null
    var createTime: Long? = System.currentTimeMillis()
    var updateTime: Long? = createTime

    /**
     * 为了让搜索更加直观,只返回标题字符串
     * @return 支持搜索的内容
     */
    override fun toString(): String {
        return title!!
    }

    override fun compareTo(o: Record): Int {
        return showOrder!!.compareTo(o.showOrder!!)
    }
}
